home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / libc / isatty.c < prev    next >
C/C++ Source or Header  |  1990-09-11  |  1KB  |  54 lines

  1. /* 
  2.  * isatty.c --
  3.  *
  4.  *    Procedure to map from Unix isatty system call to Sprite.
  5.  *
  6.  * Copyright 1986 Regents of the University of California
  7.  * All rights reserved.
  8.  */
  9.  
  10. #ifndef lint
  11. static char rcsid[] = "$Header: /sprite/src/kernel/libc/RCS/isatty.c,v 1.2 90/09/11 12:49:01 kupfer Exp $ SPRITE (Berkeley)";
  12. #endif not lint
  13.  
  14. #include <sgtty.h>
  15. #include <stdio.h>
  16. #include <unistd.h>
  17.  
  18. /*
  19.  *----------------------------------------------------------------------
  20.  *
  21.  * isatty --
  22.  *
  23.  *    This function is currently unsupped from the kernel.
  24.  *    Returns non-zero if the given file descriptor refers to a device
  25.  *    with terminal-like characteristics.
  26.  *
  27.  * Results:
  28.  *    Non-zero means fd has terminal-like behavior, zero means it
  29.  *    doesn't.
  30.  *
  31.  * Side effects:
  32.  *    None.
  33.  *
  34.  *----------------------------------------------------------------------
  35.  */
  36.  
  37. int
  38. isatty(fd)
  39.     int fd;                             /* stream identifier */
  40. {
  41. #if 0 
  42.    struct sgttyb sgttyb;
  43. #endif
  44.  
  45.     printf("isatty not supported in kernel\n");
  46.     return 0;
  47. #if 0
  48.     if (ioctl(fd, TIOCGETP, (char *) &sgttyb) == -1) {
  49.     return 0;
  50.     }
  51.     return 1;
  52. #endif
  53. }
  54.